import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isToken: true,
    userInfo: {
      name: '源生态友康',
      roles: ['admin']
    },
    routerList: [
      {
        path: '/',
        name: '/',
        redirect: '/login'
      },
      {
        path: '/login',
        name: 'login',
        component: () => import('../views/login/index')
      },
      {
        path: '/Product',
        name: '菜品库',
        redirect: '/Product/index',
        children: [
          {
            path: '/Product/index',
            name: '产品管理',
            component: () => import('../views/Product/index')
          },
          {
            path: '/Product/Adm',
            name: '产品管理',
            component: () => import('../views/Product/Adm')
          },
          {
            path: '/Product/Add',
            name: '添加',
            component: () => import('../views/Product/Add')
          }
        ]
      }
    ]
  },
  mutations: {},
  actions: {},
  modules: {}
})
